<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui">

    <h:form id="PyfntbpoaListForm">

        <p:panel header="#{myBundle.ListPyfntbpoaTitle}">

            <p:dataTable id="datalist" value="#{pyfntbpoaController.items}" var="item"
                         selectionMode="single" selection="#{pyfntbpoaController.selected}"
                         rowKey="#{item.pyfntbpoaid}"
                         paginator="true"
                         rows="5"
                         rowsPerPageTemplate="5,10,20,30"
                         >

                <p:ajax event="rowSelect"   update="createButton viewButton editButton deleteButton"/>
                <p:ajax event="rowUnselect" update="createButton viewButton editButton deleteButton"/>

                <p:column sortBy="#{item.pyfntbpoaid}" filterBy="#{item.pyfntbpoaid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbpoaTitle_pyfntbpoaid}"/>
                    </f:facet>
                    <h:outputText value="#{item.pyfntbpoaid}"/>
                </p:column>
                <p:column sortBy="#{item.anio}" filterBy="#{item.anio}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbpoaTitle_anio}"/>
                    </f:facet>
                    <h:outputText value="#{item.anio}"/>
                </p:column>
                
                <p:column sortBy="#{item.fechacierre}" filterBy="#{item.fechacierre}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbpoaTitle_fechacierre}"/>
                    </f:facet>
                    <h:outputText value="#{item.fechacierre}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:outputText>
                </p:column>
                
                <p:column sortBy="#{item.aprobacion}" filterBy="#{item.aprobacion}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbpoaTitle_aprobacion}"/>
                    </f:facet>
                    <h:selectBooleanCheckbox id="aprobacion" value="#{item.aprobacion}" title="#{myBundle.EditPyfntbpoaTitle_aprobacion}" required="true" requiredMessage="#{myBundle.EditPyfntbpoaRequiredMessage_aprobacion}" disabled="true"/>
                </p:column>
                
                <p:column sortBy="#{item.fechaemision}" filterBy="#{item.fechaemision}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbpoaTitle_fechaemision}"/>
                    </f:facet>
                    <h:outputText value="#{item.fechaemision}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:outputText>
                </p:column>
                
                <p:column sortBy="#{item.fecharegistro}" filterBy="#{item.fecharegistro}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbpoaTitle_fecharegistro}"/>
                    </f:facet>
                    <h:outputText value="#{item.fecharegistro}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:outputText>
                </p:column>
                
                <p:column sortBy="#{item.observaciones}" filterBy="#{item.observaciones}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbpoaTitle_observaciones}"/>
                    </f:facet>
                    <h:outputText value="#{item.observaciones}"/>
                </p:column>
                <f:facet name="footer">
                    <p:commandButton id="createButton" icon="ui-icon-plus"   value="#{myBundle.Create}" actionListener="#{pyfntbpoaController.prepareCreate}" update=":PyfntbpoaCreateForm" oncomplete="PyfntbpoaCreateDialog.show()"/>
                    <p:commandButton id="viewButton"   icon="ui-icon-search" value="#{myBundle.View}" update=":PyfntbpoaViewForm" oncomplete="PyfntbpoaViewDialog.show()" disabled="#{empty pyfntbpoaController.selected}"/>
                    <p:commandButton id="editButton"   icon="ui-icon-pencil" value="#{myBundle.Edit}" update=":PyfntbpoaEditForm" oncomplete="PyfntbpoaEditDialog.show()" disabled="#{empty pyfntbpoaController.selected}"/>
                    <p:commandButton id="deleteButton" icon="ui-icon-trash"  value="#{myBundle.Delete}" actionListener="#{pyfntbpoaController.delete}" update=":growl,datalist" disabled="#{empty pyfntbpoaController.selected}"/>
                </f:facet>

            </p:dataTable>

        </p:panel>

    </h:form>

</ui:composition>